/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.viettel.bkno.visionone.exception;

/**
 *
 * @author hienpt9
 */
public enum FaultType {
    // User/password khong tim thay trong database
    INVALID_USER_EXCEPTION ("001", "User or password is invalid."),
    // Khong the giao tiep voi memcached
    MEMCACHED_EXCEPTION("002", "Memcached error"),
    // Dung parameter chua duoc config
    PARAMETER_UNSET_EXCEPTION("003", "Get a unsetted parameter."),
    
    // Khong the get connection
    GET_DB_CONNECTION_EXCEPTION("004", "Get database connection error"), 
    
    // Khong tao duoc statement
    GET_STATEMEMT_EXCEPTION ("005", "Get statement from connection error"), 
    
    // Dinh dang user khong dung
    USER_FORMAT_EXCEPTION ("006", "User format is incorrect."), 
    
    // Session khong ton tai
    SESSION_INVALID ("007", "user or token is incorrect --> Can not get session."), 
    
    PERMISSION_DENIED("008", "Permission denied."), 
    
    DATABASE_ACCESS_ERROR ("009", "Database accessing error.");
    
    
    String code;
    String name;
    private FaultType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
}
